<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <div style="width: 100px;height: 100px;background: red;">
    <img style="width: 100%;height: 100%;" src="./src/assets/3.jpg"  alt="">
  </div>
  <span>111</span>
  <div>222</div>

  <script>
    console.log(111)
    setTimeout(()=>{
      console.log(222)
    },10)
    // 变成了微任务
    Promise.resolve().then(console.log(333))
    Promise.resolve().then(()=>{
      console.log(444)
    })
    console.log(555)

    // 被async 修饰的函数 相当于  
    async function fn(){
      return 1
    }
    console.log(fn())
    function fn1(){
      return new Promise((resolve,reject)=>{
        console.log('promise 中的代码是同步代码')
        // resolve中的代码是异步代码
        resolve(1)
      })
    }
    console.log(fn1())
  </script>
</body>
</html>